<script setup lang="ts">
import {useUserPinia} from '~/stores/user'
import {storeToRefs} from "pinia";
import {onMounted} from "vue";

const {locale, setLocale} = useI18n()
onMounted(() => {
  console.log("locale--language", locale.value)
})
// import Player from "xgplayer";
// import "xgplayer/dist/index.min.css";
//
// onMounted(() => {
//   new Player({
//     id: "mse", //元素id
//     lang: "zh", //设置中文
//     volume: 0, // 默认静音
//     autoplay: false, //自动播放
//     screenShot: true, // 开启截图功能
//
//     //视频地址
//     url: "https://cdn.free-stock.video/25122023/abstract-curve-chaos-paint-ink-that-design-91614-small.mp4",
//
//     //封面图
//     poster:
//         "//lf9-cdn-tos.bytecdntp.com/cdn/expire-1-M/byted-player-videos/1.0.0/poster.jpg",
//     fluid: true, // 填满屏幕 （流式布局）
//     playbackRate: [0.5, 0.75, 1, 1.5, 2] //传入倍速可选数组
//   });
// });
const userStore = useUserPinia()
const {nanoid} = storeToRefs(userStore);

</script>

<template>
    <v-card color="#BBDEFB" class="my-16 py-8" height="800">
      <v-btn @click="setLocale('en')">英文</v-btn>
      <v-btn @click="setLocale('zh')">中文</v-btn>
      <p>{{ $t('welcome') }}</p>
      <p>{{ $t('messages') }}</p>
    </v-card>
    <!--    视频插件-->
    <!--    <div id="mse"></div>-->

</template>

<style scoped>

</style>